<template>
	<view class="container">
		<view class="box">
			<view class="title flex-start">数据统计工具</view>
			<view class="ul flex-start">
				<view class="li tc" v-for="(item, index) in list" :key="index" @click="toPath(index)">
					<image :src="item.url" mode=""></image>
					<view>{{item.label}}</view>
				</view>		
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				list: [
					{
						url: '../../static/func/func1.png',
						label: '产品统计'
					},
					{
						url: '../../static/func/func2.png',
						label: '店铺统计'
					},
					{
						url: '../../static/func/func3.png',
						label: '推广位统计'
					},
					{
						url: '../../static/func/func4.png',
						label: '渠道统计'
					},
					{
						url: '../../static/func/func5.png',
						label: '员工统计'
					},
					{
						url: '../../static/func/func6.png',
						label: '标签统计'
					},
				]
			}
		},
		methods: {
			toPath(index) {
				uni.navigateTo({
					url: `/pages/func/info?curTab=${index}`
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.container {
		padding: 24rpx;
		.box {
			max-height: 410rpx;
			background-color: white;
			border-radius: 8rpx;
			padding: 18rpx 24rpx 38rpx 24rpx;
			.title {
				align-items: center;
				margin-bottom: 42rpx;
				&::before {
					content: '';
					display: block;
					width: 4rpx;
					height: 24rpx;
					background-color: $main-color;
					margin-right: 6rpx;
				}
			}
			.ul {
				flex-wrap: wrap;
				align-content: space-between;
				.li {
					margin-bottom: 38rpx;
					width: 25%;
					image {
						width: 84rpx;
						height: 84rpx;
					}
					view {
						color: #999999;
					}
				}
			}
		}
	} 
</style>
